Skip to content

feat(integrations): Support Django 5.1#3207

Merged
sentrivana merged 13 commits into
masterfrom
ivana/django-5.1
Jul 17, 2024
Merged

feat(integrations): Support Django 5.1#3207
sentrivana merged 13 commits into
masterfrom
ivana/django-5.1

Conversation

@sentrivana

@sentrivana sentrivana commented Jun 27, 2024

Copy link
Copy Markdown
Contributor

Summary of changes:

  • Test Django test suite against 5.1b1
  • Fix usage of get_converter in tests since this was removed:

The undocumented django.urls.converters.get_converter() function is removed.

Also did some manual tests, stuff looks ok.

Closes #3208

@sentrivana sentrivana changed the title tests: Test against Django 5.1 beta feat(integrations): Support Django 5.1 Jun 27, 2024

@cclauss cclauss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet!! Thx.

Oh... The failing tests are https://docs.djangoproject.com/en/dev/releases/5.1/#miscellaneous -- Might need a skipif

The undocumented django.urls.converters.get_converter() function is removed.

@cclauss cclauss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codecov

codecov Bot commented Jul 2, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.46%. Comparing base (c76168c) to head (d6b567f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3207   +/-   ##
=======================================
  Coverage   79.46%   79.46%           
=======================================
  Files         133      133           
  Lines       14290    14290           
  Branches     3004     3004           
=======================================
  Hits        11355    11355           
  Misses       2089     2089           
  Partials      846      846           

see 2 files with indirect coverage changes

@cclauss

cclauss commented Jul 2, 2024

Copy link
Copy Markdown
Contributor

def test_resolver_path_complex_path():

Something like:

@pytest.mark.skipif(
    django.VERSION >= (5, 1)
    reason="django.urls.converters.get_converter() function was removed in Django v5.1",
)

https://docs.djangoproject.com/en/dev/releases/5.1/#miscellaneous

The undocumented django.urls.converters.get_converter() function is removed.

@sentrivana

Copy link
Copy Markdown
Contributor Author

Thanks @cclauss, I'm now skipping the old test for 5.1 and I've added another for 5.1+ that uses get_converters instead. If anyone's interested, here is the Django change that prompted this.

So the test suite is passing now, I'll do some manual testing as well and then we should be good to go.

Comment thread tests/integrations/django/test_transactions.py Outdated
@sentrivana
sentrivana marked this pull request as ready for review July 16, 2024 14:51
@sentrivana
sentrivana enabled auto-merge (squash) July 16, 2024 14:52

@antonpirker antonpirker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@sentrivana
sentrivana merged commit 5e1f44b into master Jul 17, 2024
@sentrivana
sentrivana deleted the ivana/django-5.1 branch July 17, 2024 08:56
arjennienhuis pushed a commit to arjennienhuis/sentry-python that referenced this pull request Sep 30, 2024
Co-authored-by: Christian Clauss <cclauss@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Django 5.1

3 participants